package org.jiuling.kuaidi100.spring.config;

import org.jiuling.kuaidi100.ExpressCheck;
import org.jiuling.kuaidi100.config.Kuaidi100Config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 快递100SpringBean配置
 * @author 紫灵
 * @date 2024年03月01日 18时03分32秒
 */
@Configuration
public class Kuaidi100SpringBeanConfig {

    @Bean
    @ConfigurationProperties(prefix = "jiu-ling.kuaidi100.config")
    public Kuaidi100Config kuaidi100Config(){
        return new Kuaidi100Config();
    }

    @Bean
    public ExpressCheck expressCheck(){
        return new ExpressCheck(kuaidi100Config());
    }

}
